﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class Select : MonoBehaviour
{
    public Image select;
    public bool isSelect = false;
    private bool isShow = true;
    private float timer = 0;
    void Update()
    {
        if (isSelect)
        {
            timer += Time.deltaTime;
            if (timer > 0.5f)
            {
                if (isShow)
                {
                    select.gameObject.SetActive(false);
                    timer = 0;
                    isShow = false;
                }
                else
                {
                    select.gameObject.SetActive(true);
                    timer = 0;
                    isShow = true;
                }
            }
        }    
    }

}